<template>
<div >
    <div class="success">
        <div class="img">
            <p style="font-weight: 600; font-size: 18px">上传文件</p>
        </div>
    </div>
    <div class="success-detail">
        <div class="upload">
            <el-upload
            class="upload-demo"
            drag
            action=""
            :file-list="fileList"
            :auto-upload="false"
            multiple>
            <i class="el-icon-upload"></i>
            <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
            <div class="el-upload__tip" slot="tip">上传文件不能超过500kb</div>
            </el-upload>
        </div>
    </div>
</div>
</template>
<script>
export default {
    data() {
      return {
        fileList: []
      };
    },
    methods: {
      handleRemove(file, fileList) {
        console.log(file, fileList);
      },
      handlePreview(file) {
        console.log(file);
      },
      handleExceed(files, fileList) {
        this.$message.warning(`当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`);
      },
      beforeRemove(file, fileList) {
        return this.$confirm(`确定移除 ${ file.name }？`);
      }
    }
}
</script>

<style scoped>
.c2img{
    border: 1px solid #ccc;
    overflow: hidden;
    width: 100%;
}
html,body{
    padding: 0;
    margin: 0;
}
.upload{
    width: 350px;
    margin: 0 auto;
}
</style>